package com.tomato.zip.factory;


import com.tomato.zip.enums.ZipType;
import com.tomato.zip.service.BaseZip;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class ComparessService {

    @Autowired
    private List<BaseZip> zips;

    public BaseZip getZip(ZipType zipType) {
        return zips.stream().filter(t -> t.getZipType() == zipType).findFirst().get();
    }
}
